<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>煮酒听雨-一个java程序员的个人博客网站</title>
        <meta name="keywords" content="">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <link rel="shortcut icon" href="images/logo.png" type="image/x-icon" />
        <link rel="stylesheet" href="css/home.css" />
    </head>
    <body>
        <div class="container">
            <div class="img"></div>
            <div class="content">
                <div class="title">源于热爱，探索不止！</div>
                <div class="description">给自己一些时间。原谅做过很多傻事的自己。接受自己，爱自己。过去的都会过去，该来的都在路上。</div>
                <div class="time" id="time"></div>
                <div class="btn">
                    <a href="" onclick="return false" target="_blank">联系QQ</a>
                    <a href="index.html">进入博客</a>
                </div>
            </div>
        </div>
        <script>
            function systemTime(){
                var dateTime = new Date();
                var year = dateTime.getFullYear();//年份
                var month = dateTime.getMonth() + 1;//月份
                var day = dateTime.getDate();//天数
                var hh = dateTime.getHours();//小时
                var mm = dateTime.getMinutes();//分钟
                var ss = dateTime.getSeconds();//秒
                //分秒时间是一位数字，在数字前补0
                mm = extra(mm);
                ss = extra(ss);
                document.getElementById("time").innerHTML = year + "-" + month + "-" + day + '&nbsp;' + hh + ":" + mm + ":" + ss;
                setTimeout("systemTime()", 1000);
            }
            // 补位函数
            function extra(x) {
                if (x < 10) {
                    return "0" + x;
                } else{
                    return x;
                };
            }
            systemTime();
        </script>
    </body>
</html>